package com.lj.mcore.dao.base;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public interface BaseAppDAO<T> {

    boolean save(T entity);

    T findById(Serializable id);

    public T getSingleResult(Map params);


    public List<T> query(final String hql, final Map params, final int begin, final int max);

    public List querySql(final String sql, final Map params, final int begin, final int max);

    List<T> pageQuery(final String hql,String filed,Object o,int start,int pageNum);

    boolean delete(T entity);

    boolean update(T e);

    int executeUpdate(final String sql,final Map params);

    public List executeNativeSql(String sql, Map map,Object[] params, int begin, int max);

    Object findCount(String tablename, LinkedHashMap<String,Object> map);
}